<template>
    <div class="header">
      <i class="iconfont icon-fa-angle-right" @click="goBack"></i><span>{{title}}</span>
    </div>
</template>

<script>
  import {mapState} from 'vuex'
  export default {
        name: "Header",
    computed:mapState({
      title: state => state.user.title,
    }),
     methods:{
       goBack(){
         this.$router.go(-1);//返回上一层
       }
     }
    }
</script>

<style lang="scss" scoped>
  .header{
    width: 100%;
    height: 88px;
    padding: 0 30px;
    text-align: center;
    overflow: hidden;
    position: fixed;
    background: #fff;
    left: 0;
    top: 0;
    z-index: 2;
    span{
      font-size:38px;
      line-height: 88px;
      font-weight:400;
      color:rgba(51,51,51,1);
      margin: 0 auto;
    }
    i{
      font-size: 38px;
      line-height: 88px;
      margin: 3px 0 0 0;
      float: left;
    }
  }
</style>
